<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			function loadScript(url,callback) {
				var script = document.createElement('script');
				script.type = "text/javascript";
				if(script.readyState){
					script.onreadystatechange = function() { //IE
						if(script.readyState == "complete" || script.readyState == "loaded") {
							callback();
						}
					}
				}else{
					script.onload = function() { //兼容性好  Safari chrome firefox opera
						callback();
					}
				}
				script.src = url; //开始下载，但是不执行
				document.head.appendChild(script); //开始执行
			}
			loadScript('js/tools.js',function(){
				test();
			});
		</script>
	</body>

</html>